﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using MyHotel.MyHotel_MHPhong_BUS_Webservice;

namespace MyHotel
{
    public partial class frmPhong : MyForm
    {
        public frmPhong()
        {
            InitializeComponent();
        }
      //  List<uscRoom> lstUscRoom;
        private void frmPhong_Load(object sender, EventArgs e)
        {
         //   this.lstUscRoom = new List<uscRoom>();
            MHPhongBUSWSSoapClient ws = new MHPhongBUSWSSoapClient();
            Phong[] array = ws.getListPhong();

            foreach (Phong p in array)
            {
                String s = p.TinhTrang;
                StateRoomManager manager = new StateRoomManager();
                StateRoom state = manager.CreateStateRoom(p.TinhTrang);
                uscRoom room = new uscRoom(p, state);
                uscShowRoom1.add(room);

            }

            uscNoteStateRoom1.add(new RoomStateBlank().getNoteRoom());
            uscNoteStateRoom1.add(new RoomStateHiring().getNoteRoom());
        }

        void room_oneClick(object s, EventArgs e)
        {
            StateRoom sr = (StateRoom)s;
        }

        public override MyForm Clone()
        {
            return new frmPhong();
        }

        public override string getName()
        {
            return "frmPhong";
        }
    }
}
